﻿@model asMeishi.web.Models.shop
@using publicLibrary
@using asMeishi.web.Classes
@using asMeishi.web
@using asMeishi.web.Models
@using asMeishi.web.Controllers

@{
    ViewBag.Title = Model.name;
    string thisCAD = "/" + Html.getRoute(routeKeyEnum.controller) + "/" + Html.getRoute(routeKeyEnum.action) + "/" + Html.getRoute(routeKeyEnum.id);
}
<!--浮动层-->
    <div class="popActPanle"></div>
    <div class="poppAlert"></div>
<!--浮动层-->
<!--用户信息-->
<input type="hidden" id="loginUserId" value="@userC.loginUser.Id" />
<input type="hidden" id="loginUserName" value="@userC.loginUser.name" />
<!---->
<script src="/Content/script/shop.js"></script>
<div id="shopPanle" class="shopDetailPanle" shopId="@Model.Id">
        <div class="shopMainInfo cbcolor">
            <span class="shopTitle ecolor" id="shopName" revise="true" inputValue="@Model.name">@Model.name</span>
            <span class="shopHead" revise="true" id="shopHead" inputValue="@Model.head"> @publicDictApp.get("shopHead").tansValue(@Model.head.ToTryString(), "未知") </span>
            <span class="shopClassBox cbcolor">
                <span class="title">主菜系:</span>
                <span class="foodStyle" id="shopFoodStyle" revise="true" inputValue="@Model.foodStyleList.tryJoin(",")">@Model.foodStyle.ToTryString()</span>
            </span>
            <button class="ableEditBtn " id="shopEditBtn" onclick="abledEdit(this)">编辑</button>
@*            <span class="shopNameEN" id="shopNameEN" revise="true" inputValue="@Model.nameEN">@Model.nameEN</span>    *@
        </div>
        
        <div class="clearFloat"></div>
        <div class = "shopBoxLeft">
            <div class="shopHeadPic"><div class="box hackLine">
                <img src="@Model.getHeadPic()" /></div>
            </div>
        <!-- 打分--->
            <div class="shopDetailEx2" >
                <label>美味<span class="grade ncolor">@Model.quality.ToString("0.0")</span></label>
                <label>服务<span class="grade ncolor">@Model.service.ToString("0.0")</span></label>
                <label>环境<span class="grade ncolor">@Model.priceQuality.ToString("0.0")</span></label><span>@Model.score_number</span><br/>
                <label>人均消费<span class="grade ncolor">@Model.cost.ToString("0.0")</span>元  <span class='num'>【@(Model.cost_number)/人次】</span></label>
                <label class="sum">综合分值<span class="grade ncolor">@Model.sum_score.ToString("0.0")</span></label>

            </div>
            <div class="shopDetailEx2" id="resetStatistics">
                <button style=" margin:auto" class="btn-small" onclick="window.location.href='/shop/resetStatistics/@Model.Id'">精确记算统计值</button>
            </div>
            
        <!-- 打分--->
            <ul class="shopMenu">
                <li>
                    <a href="/shop/detail/@Model.Id">首页</a>
                </li>
                <li>
                    
                    <a href="/shop/detail/@Model.Id/picsList" class="hand">图片详情</a>
                    <span class="hand" style="line-height:52px">
                        <img src="@(baseConfig.siteThemePath)images/picture_add.png" onclick="showShopPicUpload()" alt="上传图片" title="上传图片" />
                    </span>

                </li>
                <li>
                    @{int foodcc = 0;
                      if (Model.food != null)
                      {
                          foodcc = Model.food.Count();
                      }
                    }

                    <a href="/shop/detail/@Model.Id/foods">菜肴推荐 (@foodcc)</a>
                </li>
                <li>
                    <a href="/shop/detail/@Model.Id/comments">点评就餐 (@Model.comment_number)</a>
                </li>                 
                <li>
                    <a href="/shop/detail/@Model.Id/impressions">印象标签 </a>
                </li>
                <li>
                    <a href="/shop/detail/@Model.Id/nearby">附近食场</a>
                </li>
@*                <li>
                    <a href="?p1=nearby">历史记录</a>
                </li>*@
@*                <li>
                    <a href="?p1=nearby">大事记</a>
                </li>*@
            </ul>

                <!---上传组件部分 经过权限判断后载入---->

                <div >
                    <script type="text/javascript" src="/Content/Components/SWFUpload/swfupload_fp10/swfupload.js"></script>
                    <script src="/Content/Components/SWFUpload/plugins/handlers.js" type="text/javascript"></script>
                    <script src="/Content/Components/SWFUpload/plugins/swfupload.queue.js" type="text/javascript"></script>
                    <script src="/Content/Components/SWFUpload/plugins/fileprogress.js" type="text/javascript"></script>
                    <div class="clearFloat"></div>
                    <div id="shopPicUpload">
                        
                        <div class="flashUploadLayer" id="flashUploadLayer">
                            <div id="divStatus">1 Files Uploaded</div>
                            <fieldset class="fsUploadProgress"  id="fsUploadProgress">
                                <legend class="legend">上传队列</legend>
                            </fieldset>
                            <button id="uploadButton">上传</button>
                            <input id="btnCancel" type="button" onclick="flashUpload.cancelQueue();" disabled="disabled" style=" border:0px; cursor:pointer;  font-size:12px; font-family:宋体; margin-left: 2px;  height: 20px;" value="取消" />
                            <input id="btnClose" type="button" value="关闭" onclick="document.getElementById('shopPicUpload').parentNode.style.display='none'" style="border:0px;color:#666; cursor:pointer;margin-left: 2px; font-size: 12px; height: 20px;" />
                        </div>
                    </div>

                </div>
                <!---上传组件部分 经过权限判断后载入 end---->
            <div class="clearFloat"></div>

            <div class="shopItem">
                <span>特色菜</span>
                <div class="hidden" id="shopItemJsonStr">@{new HtmlString(Model.food.tryJoin(","));}</div>
                <div class="" id="shopItemsBar"></div>
            </div>


        </div>
            @{
                string _c = ViewBag.channel;
                switch (_c)
                {
                    case "mainContent":
                        @Html.Partial("p_mainContent", Model) //店首信息
                   break;
                    case "picsList":
                        @Html.Partial("p_picsList", Model) //图片频道
                   //<!--<div class="shopBoxContent" id="picsPanle" content="@Model.picUrlList.ListToHTMLbyCode("<img src='\\upload\\pic\\s\\_var_.jpg' class='shopPicListItem' />")"></div>-->
                   break;
                    case "foods":
                   food f = ViewBag.food;
                   if (f == null)
                   {
                            @Html.Partial("p_foods", Model); //特色菜频道
                   }
                   else
                   {
                       ViewBag.shop = Model;
                                @Html.Partial("~/views/food/detail", f)
                   }

                   break;
                    case "comments":
                   Html.RenderAction("getComments", "shop", new { id = Model.Id, p1 = ViewBag.parameter }); //评论频道
                   break;
                    case "impressions":
                   Html.RenderAction("getImpressions", "shop", new { id = Model.Id, p1 = ViewBag.parameter }); //印象频道

                   break;
                    case "nearby":
                   Html.RenderAction("nearbyShop", "shop", new { id = Model.Id, p1 = ViewBag.parameter }); //印象频道
                   break;
                    default:
                        @Html.Partial("p_mainContent", Model)
                   break;
                }

            }

        


        <div class="clearFloat"></div>

</div>


<script type="text/javascript">
    $(function () {
        reviseRender(); parseShopItemJson();
    });
</script>
